import type { RouterModel } from './vite-env';
import Layout from './layout';
import Home from './pages/home';
import Test from './pages/test';

function NoMatch() {
  return <h1>404</h1>;
}

const routes: RouterModel[] = [
  {
    path: '/',
    element: <Layout />,
    children: [
      { index: true, element: <Home /> },
      {
        path: 'home',
        element: <Home />,
        children: [
          { index: true, element: <Test /> },
          { path: 'd1', element: <Test />, color: '#12aa9c' },
        ],
      },
      { path: '*', element: <NoMatch /> },
    ],
  },
];

export default routes;
